package com.cy.goods.controller;


import com.cy.goods.pojo.R;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class ExceptionController {

    @RequestMapping("/cal/{a}/{b}")
    @ResponseBody
    public R cal(@PathVariable Integer a,@PathVariable Integer b) {
        Integer result = a/b;
        R r = new R("结果" + result);
        r.setData(result);
        return r;
    }
}
